package com.pkk.penguin.frame.know.java.Javacoreknowledge.thread.threadsimple;

/**
 * @description: 线程创建的方式之一实现Runnable
 * @author: peikunkun
 * @create: 2019-12-23 17:34
 **/
public class SimpleRunnable implements Runnable {

  /**
   * When an object implementing interface <code>Runnable</code> is used to create a thread, starting the thread causes
   * the object's
   * <code>run</code> method to be called in that separately executing
   * thread.
   * <p>
   * The general contract of the method <code>run</code> is that it may take any action whatsoever.
   *
   * @see Thread#run()
   */
  @Override
  public void run() {
    System.out.println(Thread.currentThread().getName().concat(" is Running"));
  }


  public static void main(String[] args) {
    new SimpleRunnable().run();
  }

}
